package com.siyue.config;

import com.siyue.vo.FileExportVo;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
public class ResponseMessage<T> {

    private String status;
    private String message;
    private T data;


    public static ResponseMessage ok(String msg, Object data) {
        return new ResponseMessage("200", msg, data);
    }

    public static ResponseMessage ok(String msg) {
        return new ResponseMessage("200", msg);
    }


    public ResponseMessage(String status, String message, T data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }


    public ResponseMessage(String status, String message) {
        this.status = status;
        this.message = message;
    }

    public static ResponseMessage error(String msg) {
        return new ResponseMessage("500", msg);
    }


}
